<?php

/**
 * Student filter form base class.
 *
 * @package    ecollegeplus
 * @subpackage filter
 * @author     Batanayi Matuku
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedInheritanceTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseStudentFormFilter extends ProfileFormFilter
{
  protected function setupInheritance()
  {
    parent::setupInheritance();

    $this->widgetSchema   ['number'] = new sfWidgetFormFilterInput();
    $this->validatorSchema['number'] = new sfValidatorPass(array('required' => false));

    $this->widgetSchema   ['high_school'] = new sfWidgetFormFilterInput();
    $this->validatorSchema['high_school'] = new sfValidatorPass(array('required' => false));

    $this->widgetSchema   ['studied_at'] = new sfWidgetFormFilterInput();
    $this->validatorSchema['studied_at'] = new sfValidatorPass(array('required' => false));

    $this->widgetSchema   ['current_study'] = new sfWidgetFormFilterInput();
    $this->validatorSchema['current_study'] = new sfValidatorPass(array('required' => false));

    $this->widgetSchema   ['enrollment'] = new sfWidgetFormChoice(array('choices' => array('' => '', 'Full time' => 'Full time', 'Part time' => 'Part time')));
    $this->validatorSchema['enrollment'] = new sfValidatorChoice(array('required' => false, 'choices' => array('Full time' => 'Full time', 'Part time' => 'Part time')));

    $this->widgetSchema   ['status'] = new sfWidgetFormChoice(array('choices' => array('' => '', 'Application received' => 'Application received', 'Application accepted' => 'Application accepted', 'but not registered' => 'but not registered', 'Application rejected' => 'Application rejected', 'Not registered' => 'Not registered', 'Registered' => 'Registered', 'Expelled' => 'Expelled', 'Alumin' => 'Alumin', 'Withdrawn' => 'Withdrawn', 'Dropped out' => 'Dropped out')));
    $this->validatorSchema['status'] = new sfValidatorChoice(array('required' => false, 'choices' => array('Application received' => 'Application received', 'Application accepted' => 'Application accepted', 'but not registered' => 'but not registered', 'Application rejected' => 'Application rejected', 'Not registered' => 'Not registered', 'Registered' => 'Registered', 'Expelled' => 'Expelled', 'Alumin' => 'Alumin', 'Withdrawn' => 'Withdrawn', 'Dropped out' => 'Dropped out')));

    $this->widgetSchema->setNameFormat('student_filters[%s]');
  }

  public function getModelName()
  {
    return 'Student';
  }

  public function getFields()
  {
    return array_merge(parent::getFields(), array(
      'number' => 'Text',
      'high_school' => 'Text',
      'studied_at' => 'Text',
      'current_study' => 'Text',
      'enrollment' => 'Enum',
      'status' => 'Enum',
    ));
  }
}
